import { defHttp } from '/@/utils/http/axios'

import { ErrorMessageMode } from '/#/axios'
import {
  startBaseStationActivationParams,
  startCoreNetworkActivationParams,
  startUERegistrationParams,
  startUserContractParams,
} from './model/coreNetWorkModel'

enum Api {
  StartUserContract = '/console/startUserContract',
  StartCoreNetworkActivation = '/console/startCoreNetworkActivation',
  StartUERegistration = '/console/startUERegistration',
  StartBaseStationActivation = '/console/startBaseStationActivation',
}
//启动用户签约平台
export function startUserContractApi(
  params: startUserContractParams,
  mode: ErrorMessageMode = 'modal',
) {
  return defHttp.post(
    {
      url: Api.StartUserContract,
      params,
    },
    {
      errorMessageMode: mode,
    },
  )
}

//启动核心网系统
export function startCoreNetworkActivationApi(
  params: startCoreNetworkActivationParams,
  mode: ErrorMessageMode = 'modal',
) {
  return defHttp.post(
    {
      url: Api.StartCoreNetworkActivation,
      params,
    },
    {
      errorMessageMode: mode,
    },
  )
}
//启动UE注册
export function startUERegistrationApi(
  params: startUERegistrationParams,
  mode: ErrorMessageMode = 'modal',
) {
  {
    return defHttp.post(
      {
        url: Api.StartUERegistration,
        params,
      },
      {
        errorMessageMode: mode,
      },
    )
  }
}

export function startBaseStationActivationApi(
  params: startBaseStationActivationParams,
  mode: ErrorMessageMode = 'modal',
) {
  {
    return defHttp.post(
      {
        url: Api.StartBaseStationActivation,
        params,
      },
      {
        errorMessageMode: mode,
      },
    )
  }
}
